#!/usr/bin/env python

from twisted.internet import defer, reactor

def deferencia():
    d = defer.Deferred()
    return d

def print1():
    print "print 1"
    
def print2():
    print "print 2"
    
def print3():
    print "print 3"
    
def print4():
    print "print 4"
    
a = deferencia()
a.addCallback(print1)
a.addCallback(print2)
a.addCallback(print3)
a.addCallback(print4)
reactor.run()